Loads a new locale.

<div class="definition">
    locale(locale, [keepPhrases]);
</div>

Returns a <i>promise</i>.

<div class="arguments">
    <table>
    <tr>
        <td>locale</td>
        <td><b>string</b> or <b>path</b> or <b>object</b> or <b>array</b>, name of the locale or path to the locale file, or settings object with the locale</td>
    </tr>
    <tr>
        <td>keepPhrases</td>
        <td><b>boolean</b>, <i>optional</i>, keep phrases when mergin locale objects</td>
    </tr>
    </table>
</div>

<h4>Description</h4>

The first parameter can be a string or a path to the file or an object or an array of strings/paths. If it is a string (ex: ru-ru) it is the name of the locale. It will attempt
to load the JSON file from the /locale folder. If you want to load locale file from some other folder, you need to provide full path to it.
If it's an object than the settings object will be extended with properties of this locale object.
If it's an array of strings or paths, all JSON files will be loaded in order and then be merged.
<div style="height: 10px"></div>

The method will perform <b>synchronous</b> load of the locale, so it will pause until locale is loaded.
<div style="height: 10px"></div>

You can call in in the following way:
<textarea class="javascript">
w2utils.locale('ru-ru');
// or
w2utils.locale('/path/to/locale/ru-ru.json');
// or
w2utils.locale({
    dateFormat     : "dd-mm-yyyy",
    dataType       : 'RESTFULLJSON'
    dateStartYear  : 1990
});
// or
w2utils.locale(['ru-ru', '/path/to/locale/ru-ru.json', '/path/to/another/locale/ru-ru.json']);
</textarea>